#include"LinkList.h"

void test1()
{
	LinkList *s1= ( LinkList*)malloc(sizeof(LinkList));
	s1->x=10;
	LinkList* s2 = (LinkList*)malloc(sizeof(LinkList));
	s2->x = 10;	
	LinkList* s3 = (LinkList*)malloc(sizeof(LinkList));
	s3->x = 10;
	LinkList* s4 = (LinkList*)malloc(sizeof(LinkList));
	s4->x = 10;
	LinkList* s5 = (LinkList*)malloc(sizeof(LinkList));
	s5->x = 10;
	LinkList* s6 = (LinkList*)malloc(sizeof(LinkList));
	s6->x = 10;
	s1->next = s2;
	s2->next = s3;
	s3->next = s4;
	s4->next = s5;
	s5->next = s6;
	s6->next = NULL;
	LinkList* plist = s1;
	LKPrint(plist);
}



void test2()
{
	LinkList* plist =NULL;
	LKPushBack(&plist, 3);
	LKPushFront(&plist, 10);
	LKPushFront(&plist, 11);
	LKPushFront(&plist, 12);
	LKPushFront(&plist, 13);
	LKPushFront(&plist, 14);

	LKPopBack(&plist);
	LKPrint(plist);
	LKPopBack(&plist);
	LKPrint(plist);
	LKPushInsert(&plist, LKFind(plist, 12), 8);
	LKPrint(plist);
	LKPushInsertAfter(&plist, LKFind(plist, 12), 100);
	LKPrint(plist);
	LKPopInsert(&plist, LKFind(plist, 12));
	LKPrint(plist);
	LKPopInsertAfter(LKFind(plist, 100));
	LKPrint(plist);

}

int main()
{

	test2();

	return 0;
}